<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电话号码模糊处理</title>
</head>
<body>
    <script>
        console.log('@'.repeat(3));
        function phone(mobile,len=3) {
            return String(mobile).slice(0,3) + "*".repeat(len) + String(mobile).slice(3+len-1,-1);
        }
        console.log(phone(23234387986,4));
    </script>
</body>
</html>